﻿using System;
using System.Windows.Forms;

namespace ClientApp.Forms
{
    public partial class frmAskPauseTime : Form
    {
        private Guid svcId;

        public frmAskPauseTime(Guid svcId, int loopingPause)
        {
            InitializeComponent();

            this.svcId = svcId;
            tb.Value = loopingPause;
        }

        public int LoopingPause
        {
            get { return tb.Value.Value; }
        }

        private void btnConfirm_Click(object sender, EventArgs e)
        {
            if (tb.Value.HasValue && tb.Value.Value  > 0)
            {
                DialogResult = System.Windows.Forms.DialogResult.OK;
                Close();
                return;
            }

            MessageBox.Show("Indicare un valore in secondi, maggiore di zero");
        }
    }
}
